#include <stdlib.h>

#include "dtk_types.h"
#include "dtk_debug.h"
#include "dtk_actor.h"
#include "dtk_box.h"

const DString DTK_TYPE_BOX = "DTKBox";

DTKActor* dtk_box_new()
{
    DTKActor* actor;
    DTKLayout* layout;
    DTKActorCallback*   funcs;

    actor = dtk_container_init(sizeof(DTKBox), DTK_TYPE_BOX, DACAPS_HASCONTENT);
    layout = dtk_stack_layout_new(actor, DTK_VERTICAL);
    dtk_actor_set_layout(actor, layout);
    
    return actor;
}

void dtk_box_set_orientation (DTKActor* self, DTKOrientation* orientation)
{
    DTKBox* box = (DTKBox*) self;

    DTK_TYPE_ASSERT(self, DTK_TYPE_BOX);
    dtk_stack_layout_set_orientation (dtk_actor_get_layout(self), orientation);    
    return;
}